package com.common.util;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
    private static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
    public static String format(Date date){
        return dateFormat.format(date);

    }
    public static Date parse(String date){

        try {
            return dateFormat.parse(date);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
}
